<script setup>
import { ref } from 'vue'
import List from './views/List.vue'
import Upload from './views/Upload.vue'
import { mainStore } from '../../store/mainStore'
import { goback } from './js/goBack.js'

const store = mainStore()
</script>

<template>
  <div class="fileTransfer-container">
    <!-- 头部导航栏 -->
    <div class="nav-top" v-if="store.fileTransferTitle != 1">
      <div @click="goback">
        <img src="/public/global/back.png" />
        返回
      </div>
    </div>

    <!-- 中间内容区分 -->
    <div class="content">
      <List v-if="store.fileTransferTitle == 1"></List>
      <Upload v-if="store.fileTransferTitle == 2"></Upload>
    </div>
  </div>
</template>

<style lang="less" scoped>
.fileTransfer-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 20px 0 20px;
}

.nav-top {
  height: 40px;
  width: 100%;
  font-size: 14px;
  display: flex;
  align-items: center;
  div {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #4095e5;
    font-weight: 700;
  }
  img {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    margin-top: 2px;
  }
}

.content {
  flex: 1;
}
</style>
